﻿using System;

namespace SPContrib
{
    /// <summary>
    /// Represents a generic event argument class
    /// </summary>
    /// <typeparam name="T">the type to send in the event arguments</typeparam>
    public class EventArgs<T> : EventArgs
    {
        /// <summary>
        /// The value of the event argument
        /// </summary>
        public T Value
        {
            get;
            private set;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="EventArgs&lt;T&gt;"/> class.
        /// </summary>
        public EventArgs(T value)
        {
            this.Value = value;
        }

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        public override string ToString()
        {
            return this.Value.ToString();
        }
    }
}
